package controllers

import "github.com/gin-gonic/gin"

type ArticleController struct{}

func (article ArticleController) GetList(c *gin.Context) {
	ReturnSuccess(c, 0, "success", "a", 1)
}

func (artcile ArticleController) GetInfo(c *gin.Context) {
	id := c.Param("id")
	ReturnSuccess(c, 0, "success", id, 0)
}

func (article ArticleController) AddInfo(c *gin.Context) {
	title := c.PostForm("name")
	content := c.DefaultPostForm("content", "内容为空")

	ReturnSuccess(c, 0, content, title, 0)
}
